package com.eulog.client.blackJack;

import com.eulog.client.trump.TrumpCard;
import com.eulog.client.trump.TrumpDecks;

public class BlackJackDecks extends TrumpDecks {

	private BlackJackStrategy blackJackStrategy;
	final private int totalCardSizeByRankNotTenValue;
	final private int totalCardSizeByRankTenValue;
	
	public BlackJackDecks(int deckNum, boolean doShuffle, int pivot,BlackJackRules rules) {
		super(deckNum, doShuffle, pivot);
		
		blackJackStrategy = new BlackJackStrategy(this,rules);
		
		totalCardSizeByRankNotTenValue = 4*deckNum;
		totalCardSizeByRankTenValue = 16*deckNum;
	}
	
	@Override
	public TrumpCard dealOneCard() {
		
		TrumpCard card = super.dealOneCard();
		blackJackStrategy.countCard(card);
		
		return card;
	}
	
	public BlackJackStrategy getBlackJackStrategy() {return blackJackStrategy;}
	
	public int getTotalCardSizeByRank(boolean isTenValue) {return isTenValue?totalCardSizeByRankTenValue:totalCardSizeByRankNotTenValue;}
}
